package com.pipodi.itasamobile.utils;

import java.util.List;

import com.pipodi.itasamobile.model.interfaces.NewsInterface;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;

public class NewsListAdapter extends ArrayAdapter<NewsInterface> {
	private List<NewsInterface> items;
	private LayoutInflater inflater;

	public NewsListAdapter(Context context, LayoutInflater inflater,
			List<NewsInterface> items) {
		super(context, 0, items);
		this.items = items;
		this.inflater = inflater;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// Use getView from the Item interface
		return items.get(position).getView(inflater, convertView);
	}
}
